package com.dmooo.yxmmerchant.http;

import com.common.net.entity.HttpResult;

import java.util.Map;

import okhttp3.RequestBody;
import okhttp3.ResponseBody;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Streaming;
import retrofit2.http.Url;
import rx.Observable;

/**
 * service统一接口数据
 * Created by WMM on 2019/6/12.
 */
public interface HttpService {
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAccount&a=login")
    Observable<HttpResult<Object>> userLogin(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAccount&a=loginAdmin")
    Observable<HttpResult<Object>> loginAdmin(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAccount&a=register")
    Observable<HttpResult<Object>> userRegiter(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=getMerchantMsg")
    Observable<HttpResult<Object>> getMerchantMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=User&a=getMsg")
    Observable<HttpResult<Object>> getMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=editMerchantMsg")
    Observable<HttpResult<Object>> editMerchantMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Index&a=statistics")
    Observable<HttpResult<Object>> statistics(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Sms&a=sendFindpwd")
    Observable<HttpResult<Object>> sendUserFindpwd(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=editMerchantAvatar")
    Observable<HttpResult<Object>> editMerchantAvatar(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAccount&a=findPwdByPhone")
    Observable<HttpResult<Object>> findPwdByPhone(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Coupon&a=add")
    Observable<HttpResult<Object>> addCoupon(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Article&a=version")
    Observable<HttpResult<Object>> version(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=statistics")
    Observable<HttpResult<Object>> statisticsOrder(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=statistics")
    Observable<HttpResult<Object>> statisticsServiceOrder(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=getOrderList2")
    Observable<HttpResult<Object>> getServiceOrderList2(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app.php?c=Service&a=getService")
    Observable<HttpResult<Object>> getServiceDetail(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=getOrderList2")
    Observable<HttpResult<Object>> getOrderList2(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app.php?c=Goods&a=getGoodsMsg")
    Observable<HttpResult<Object>> getGoodsMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Coupon&a=getCouponList")
    Observable<HttpResult<Object>> getCouponList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Coupon&a=del")
    Observable<HttpResult<Object>> delCoupon(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Coupon&a=edit")
    Observable<HttpResult<Object>> editCoupon(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Sms&a=sendRegister")
    Observable<HttpResult<Object>> sendUserRegister(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app.php?c=User&a=editUserMsg")
    Observable<HttpResult<Object>> editUserMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=changePwd")
    Observable<HttpResult<Object>> changePwd(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBanner&a=getBannerList")
    Observable<HttpResult<Object>> getBannerList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBanner&a=del")
    Observable<HttpResult<Object>> delBanner(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Bank&a=getBankList")
    Observable<HttpResult<Object>> getBankTypeList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=BankAccount&a=getAccountList")
    Observable<HttpResult<Object>> getUserBank(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=BankAccount&a=add")
    Observable<HttpResult<Object>> addUserBank(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=BankAccount&a=del")
    Observable<HttpResult<Object>> delUserBank(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=sendDrawPwdCode")
    Observable<HttpResult<Object>> sendDrawPwdCode(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=setDrawPwd")
    Observable<HttpResult<Object>> setDrawPwd(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=draw")
    Observable<HttpResult<Object>> userDrawMoney(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=changeBandingPhone")
    Observable<HttpResult<Object>> changeBandingPhone(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app.php?c=Article&a=getArticleMsg")
    Observable<HttpResult<Object>> getArticleMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/app.php?c=Article&a=getArticleList")
    Observable<HttpResult<Object>> getArticleListByCatId(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Sms&a=sendChangeBandCode")
    Observable<HttpResult<Object>> sendChangeBandCode(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Sms&a=sendChangeBanding")
    Observable<HttpResult<Object>> sendChangeBanding(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=isSetDrawPwd")
    Observable<HttpResult<Object>> isSetDrawPwd(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=checkDrawPwd")
    Observable<HttpResult<Object>> checkDrawPwd(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=getOrderList")
    Observable<HttpResult<Object>> getGoodsOrderList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Logistics&a=getLogisticsList")
    Observable<HttpResult<Object>> getLogisticsList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=getLogisticsMsg")
    Observable<HttpResult<Object>> getLogisticsMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=send")
    Observable<HttpResult<Object>> sendGoodsOrder(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=getOrderMsg")
    Observable<HttpResult<Object>> getGoodsOrderDetail(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=getOrderMsg")
    Observable<HttpResult<Object>> getServiceOrderDetail(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=confirmPay")
    Observable<HttpResult<Object>> confirmServiceOrderPay(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=getOrderList")
    Observable<HttpResult<Object>> getServiceOrderList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=checkRefund")
    Observable<HttpResult<Object>> checkRefund(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=checkRefund")
    Observable<HttpResult<Object>> serviceCheckRefund(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=refund")
    Observable<HttpResult<Object>> refund(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=confirmPay")
    Observable<HttpResult<Object>> confirmPay(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=send")
    Observable<HttpResult<Object>> finishService(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=confirmPay")
    Observable<HttpResult<Object>> confirmServicePay(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantImg&a=getImgList")
    Observable<HttpResult<Object>> getImgList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantImg&a=del")
    Observable<HttpResult<Object>> delAlbImg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantNotice&a=edit")
    Observable<HttpResult<Object>> edtiNotice(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantNotice&a=getNotice")
    Observable<HttpResult<Object>> getNotice(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantSuggest&a=suggest")
    Observable<HttpResult<Object>> suggest(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=sendEmail")
    Observable<HttpResult<Object>> sendEmail(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Merchant&a=bandingEmail")
    Observable<HttpResult<Object>> bandingEmail(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=getGoodsAuth")
    Observable<HttpResult<Object>> getGoodsAuth(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=getServiceAuth")
    Observable<HttpResult<Object>> getServiceAuth(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=getAdminList")
    Observable<HttpResult<Object>> getAdminList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=getAdminMsg")
    Observable<HttpResult<Object>> getAdminMsg(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=add")
    Observable<HttpResult<Object>> addAdmin(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=setPartialPay")
    Observable<HttpResult<Object>> setPartialPay(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=getServiceAdminList")
    Observable<HttpResult<Object>> getServiceAdminList(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=changeOrderPrice")
    Observable<HttpResult<Object>> changeOrderPrice(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=ServiceOrder&a=changeOrderPrice")
    Observable<HttpResult<Object>> changeServiceOrderPrice(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Invoice&a=getInvoiceApply")
    Observable<HttpResult<Object>> getInvoiceApply(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Invoice&a=treat")
    Observable<HttpResult<Object>> treatInvoice(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=getPartialPay")
    Observable<HttpResult<Object>> getPartialPay(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=Order&a=delPartialPay")
    Observable<HttpResult<Object>> delPartialPay(@FieldMap Map<String, String> params);

    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=edit")
    Observable<HttpResult<Object>> editAdmin(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantAdmin&a=del")
    Observable<HttpResult<Object>> delAdmin(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=getBalanceRecord")
    Observable<HttpResult<Object>> getBalanceRecord(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=getDrawRecord")
    Observable<HttpResult<Object>> getDrawRecord(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=statisticsByGoods")
    Observable<HttpResult<Object>> statisticsByGoods(@FieldMap Map<String, String> params);
    @FormUrlEncoded
    @POST("/merchant.php?c=MerchantBalance&a=statisticsByService")
    Observable<HttpResult<Object>> statisticsByService(@FieldMap Map<String, String> params);



    @FormUrlEncoded
    @POST("/app.php?c=User&a=editUserAvatar")
    Observable<HttpResult<Object>> upUserAvatar(@FieldMap Map<String, RequestBody> file, @Field("token") String token);
    //当文件大时必须使用@streaming流
    @Streaming
    @GET
    Observable<ResponseBody> downloadFile(@Url String fileUrl);
}
